<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>无标题文档</title>
		<style type="text/css">
#con {
	font-size: 12px;
	width: 660px;
	height: 1500px;
	margin: 0px;
	float: left;
}

ol li {
	margin: 8px;
}

body {
	margin: 0px;
	padding: 0px;
	background-image: none;
	color: #0066cb;
	font-family: Arial, Helvetica, sans-serif, "宋体";
	font-size: 12px;
}

#tags {
	height: 32px;
	line-height: 32px;
	font-size: 14px;
	width: 660px;
	float: left;
	margin: 0px;
	padding-top: 0px;
	padding-right: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
	overflow: hidden;
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: #9fc9df;
}

#biaoti {
	height: 29px;
	background-image: url(<%=basePath%>resource/img/index/list1.jpg);
	background-repeat: repeat-x;
	line-height: 29px;
	font-size: 15px;
	width: 660px;
	float: left;
	margin: 0px;
	padding-top: 0px;
	padding-right: 0px;
	padding-bottom: 14px;
	padding-left: 0px;
	background-position: left bottom;
	overflow: hidden;
	font-weight: bold;
	color: #124071;
}

#tags li {
	float: left;
	list-style-type: none;
	height: 32px;
	background-image: url(<%=basePath%>resource/img/index/list1.jpg);
	background-repeat: repeat-x;
	background-position: left bottom;
	overflow: hidden;
	padding: 0px;
	margin-right: 5px;
	width: auto;
}

#tags li a {
	padding-left: 10px;
	float: left;
	padding-bottom: 0px;
	color: #002c58;
	line-height: 32px;
	padding-top: 0px;
	height: 32px;
	text-decoration: none;
	background-image: url(<%=basePath%>resource/img/index/1-2-1.jpg);
	background-repeat: no-repeat;
	background-position: left bottom;
	width: auto;
	font-family: "宋体";
	font-size: 13px;
	padding-right: 0px;
	overflow: hidden;
	margin: 0px;
}

#tags li a .bei {
	background-image: url(<%=basePath%>resource/img/index/1-3-1.jpg);
	background-repeat: no-repeat;
	background-position: right bottom;
	height: 32px;
	padding-top: 0px;
	padding-right: 10px;
	padding-bottom: 0px;
	padding-left: 0px;
	float: left;
	overflow: hidden;
}

#tags li.emptyTag {
	background: none transparent scroll repeat 0% 0%;
	width: 4px;
}

#tags li.selectTag {
	height: 32px;
	line-height: 32px;
	background-image: none;
	background-repeat: repeat;
	background-position: left top;
	position: relative;
	float: left;
}

#tags li.selectTag a {
	line-height: 32px;
	background-image: url(<%=basePath%>resource/img/index/1-1-1.jpg);
	background-repeat: no-repeat;
	background-position: left bottom;
	float: left;
	height: 32px;
	padding-left: 10px;
	font-weight: bold;
	color: #FFF;
}

#tags li.selectTag a .bei {
	background-position: right bottom;
	color: #FFF;
	line-height: 32px;
	height: 32px;
	background-image: url(<%=basePath%>resource/img/index/1-4-1.jpg);
	background-repeat: no-repeat;
	padding-right: 10px;
	float: left;
}

#tagContent {
	background-color: #fff;
	padding: 0px;
	float: left;
	height: auto;
	width: 660px;
	border: 0px solid #aecbd4;
}

.tagContent {
	display: none;
	color: #0066cb;
	height: auto;
	overflow: hidden;
	padding-bottom: 10px;
	float: left;
	width: 660px;
	padding-top: 10px;
}

#tagContent div.selectTag {
	display: block;
	float: left;
}

.list-1 {
	background-image: url(<%=basePath%>resource/img/index/list-1.jpg);
	background-repeat: no-repeat;
	background-position: left center;
	text-align: left;
	float: right;
	height: 24px;
	width: 93px;
	line-height: 24px;
	color: #002C58;
	padding-left: 4px;
}

li {
	list-style: none;
	margin: 0px;
	padding: 0px;
}

.rolinList {
	width: 660px;
	height: auto;
	text-align: left;
	padding: 0px;
	float: left;
	margin: 0px;
}

.rolinList li {
	margin-bottom: 1px;
	border: 0px solid #DADADA
}

.rolinList li h2 {
	width: 648px;
	height: 40px;
	background: #fff;
	font-size: 14px;
	line-height: 40px;
	padding-left: 0px;
	color: #003366;
	cursor: pointer;
	margin: 0px;
	padding-top: 0px;
	padding-right: 0px;
	padding-bottom: 0px;
}

.content {
	height: auto;
	width: 658px;
	background: #fff;
	background: #FAFAFA;
	padding-bottom: 10px;
}

.content p {
	margin-top: 0px;
	line-height: 20px;
	padding-right: 12px;
	padding-left: 12px;
	height: auto;
	width: 634px;
	margin-right: 0px;
	margin-bottom: 0px;
	margin-left: 0px;
	padding-top: 0px;
	padding-bottom: 0px;
}

/**/
DIV.sabrosus {
	MARGIN: 0px;
	TEXT-ALIGN: center;
	height: 30px;
	width: 620px;
	float: left;
	padding-top: 15px;
	padding-right: 6px;
	padding-bottom: 6px;
	padding-left: 6px;
}

DIV.sabrosus A {
	BORDER-RIGHT: #9aafe5 1px solid;
	PADDING-RIGHT: 5px;
	BORDER-TOP: #9aafe5 1px solid;
	PADDING-LEFT: 5px;
	PADDING-BOTTOM: 2px;
	BORDER-LEFT: #9aafe5 1px solid;
	COLOR: #2e6ab1;
	MARGIN-RIGHT: 2px;
	PADDING-TOP: 2px;
	BORDER-BOTTOM: #9aafe5 1px solid;
	TEXT-DECORATION: none
}

DIV.sabrosus A:hover {
	BORDER-RIGHT: #2b66a5 1px solid;
	BORDER-TOP: #2b66a5 1px solid;
	BORDER-LEFT: #2b66a5 1px solid;
	COLOR: #000;
	BORDER-BOTTOM: #2b66a5 1px solid;
	BACKGROUND-COLOR: lightyellow
}

DIV.pagination A:active {
	BORDER-RIGHT: #2b66a5 1px solid;
	BORDER-TOP: #2b66a5 1px solid;
	BORDER-LEFT: #2b66a5 1px solid;
	COLOR: #000;
	BORDER-BOTTOM: #2b66a5 1px solid;
	BACKGROUND-COLOR: lightyellow
}

DIV.sabrosus SPAN.current {
	BORDER-RIGHT: navy 1px solid;
	PADDING-RIGHT: 5px;
	BORDER-TOP: navy 1px solid;
	PADDING-LEFT: 5px;
	FONT-WEIGHT: bold;
	PADDING-BOTTOM: 2px;
	BORDER-LEFT: navy 1px solid;
	COLOR: #fff;
	MARGIN-RIGHT: 2px;
	PADDING-TOP: 2px;
	BORDER-BOTTOM: navy 1px solid;
	BACKGROUND-COLOR: #2e6ab1
}

DIV.sabrosus SPAN.disabled {
	BORDER-RIGHT: #929292 1px solid;
	PADDING-RIGHT: 5px;
	BORDER-TOP: #929292 1px solid;
	PADDING-LEFT: 5px;
	PADDING-BOTTOM: 2px;
	BORDER-LEFT: #929292 1px solid;
	COLOR: #929292;
	MARGIN-RIGHT: 2px;
	PADDING-TOP: 2px;
	BORDER-BOTTOM: #929292 1px solid
}

.ddddddddddd {
	line-height: 30px;
	height: 30px;
	width: 630px;
	background-image:
		url(<%=basePath%>resource/img/index/fl_collapsed_yes.gif);
	background-repeat: no-repeat;
	background-position: 8px 9px;
	padding-left: 28px;
	font-size: 14px;
	border-bottom-width: 1px;
	border-bottom-style: dashed;
	border-bottom-color: #CCC;
}

.content .ddddddddddd a {
	text-decoration: none;
	color: #0066CB;
}

.ddddddddddd a:hover {
	color: #F63;
}
.content .aboutUs{
	height: 800px;
	overflow: auto;
}
.content img{width: 92%;}
.content p{width: 92%;}
</style>
<script src="<%=basePath%>resource/js/jquery-1.4.2.js"></script>
<link href="<%=basePath%>resource/css/pagination2.css" rel="stylesheet" type="text/css" />
<script src="<%=basePath%>resource/js/pagination2.js"></script>
		<script language="javascript">
/*第一种形式 第二种形式 更换显示样式*/
function setTab(name,cursel,n){
 for(i=1;i<=n;i++){
  var menu=document.getElementById(name+i);
  var con=document.getElementById("con_"+name+"_"+i);
  menu.className=i==cursel?"hover":"";
  con.style.display=i==cursel?"block":"none";
 }
}
</script>
		<script type="text/javascript">
//<![CDATA[
window.onload = function() {
var aboutUsObj = jQuery('#aboutUs');
var aboutUsHeight = aboutUsObj.outerHeight(true);
if(aboutUsHeight>800){
	aboutUsObj.addClass('aboutUs');
}
rolinTab("rolin");
}
function rolinTab(obj) {
var list = $(obj).getElementsByTagName("LI");
var state = {show:false,hidden:false,showObj:false};

for (var i=0; i<list.length; i++) {
var tmp = new rolinItem(list[i],state);
if (i == 0) tmp.pShow();
}
}

function rolinItem(obj,state) {
var speed = 0.0666; 
var range = 1;
var interval;
var tarH;
var tar = this;
var head = getFirstChild(obj);
var content = getNextChild(head);
var isOpen = false;
this.pHidden = function() {
if (isOpen) hidden();
}
this.pShow = show;

var baseH = content.offsetHeight;
content.style.display = "none";
var isOpen = false;

head.onmouseover = function() {
this.style.background = "#ffffff";
}

head.onmouseout = mouseout;

head.onclick = function() {
this.style.background = "#ffffff";
if (!state.show && !state.hidden) {
if (!isOpen) {
head.onmouseout = null;
show();
} else {
hidden();
}

}
}

function mouseout() {
this.style.background = "#FFF"
}
function show() {
head.style.borderBottom = "1px solid #DADADA";
state.show = true;
if (state.openObj && state.openObj != tar ) {
state.openObj.pHidden();
}
content.style.height = "0px";
content.style.display = "block";
content.style.overflow = "hidden";
state.openObj = tar;
tarH = baseH;

interval = setInterval(move,10);
}
function showS() {
isOpen = true;
state.show = false;
}

function hidden() {
state.hidden = true;
tarH = 0;
interval = setInterval(move,10);
}

function hiddenS() {
head.style.borderBottom = "none";
head.onmouseout = mouseout;
head.onmouseout();
content.style.display = "none";
isOpen = false;
state.hidden = false;
}

function move() {
var dist = (tarH - content.style.height.pxToNum())*speed;
if (Math.abs(dist) < 1) dist = dist > 0 ? 1: -1;
content.style.height = (content.style.height.pxToNum() + dist) + "px";
if (Math.abs(content.style.height.pxToNum() - tarH) <= range ) {
clearInterval(interval);
content.style.height = tarH + "px";
if (tarH != 0) {
showS()
} else {
hiddenS();
}
}
}

}
var $ = function($) {return document.getElementById($)};
String.prototype.pxToNum = function() {return Number(this.replace("px",""))}
function getFirstChild(obj) {
var result = obj.firstChild;
while (!result.tagName) {
result = result.nextSibling;
}
return result;
}

function getNextChild(obj) {
var result = obj.nextSibling;
while (!result.tagName) {
result = result.nextSibling;
}
return result;
}
//]]>
</script>
	</head>

	<body>
		<div id="con">
			<ul id="tags">
				<li class="selectTag">
					<a onClick="selectTag('tagContent0',this)"
						href="javascript:void(0)"><span class="bei"><s:property value="#brandobj.name"/></span>
					</a>
				</li>
				<li>
					<a onClick="selectTag('tagContent1',this)"
						href="javascript:void(0)"><span class="bei">评价口碑</span>
					</a>
				</li>
			</ul>
			<div id="tagContent">
				<div class="tagContent selectTag" id="tagContent0">
					<ul class="rolinList" id="rolin">
						<li id="aboutUsLi">
							<h2>
								<table width="650" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="100%" height="42px">
											<img src="<%=basePath%>resource/img/index/tit.jpg"
												width="239" height="24" />
										</td>

									</tr>
								</table>
							</h2>
							<div class="content" id="aboutUsC">
								<div id="aboutUs">
									<s:property value="#brandobj.brandDesc" escape="false"/>
								</div>
							</div>
						</li>
						<li>
							<h2>
								<table width="650" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="100%" height="42px">
											<img src="<%=basePath%>resource/img/index/tit2.jpg"
												width="239" height="24" />
										</td>
									</tr>
								</table>
							</h2>
							<div class="content">
								<div id="messageList">
									<s:iterator value="#messagePu.list">
										<div class="ddddddddddd">
											<a target="_parent" href="<%=basePath%>brand/showMessage.shtml?messageId=<s:property value="id" />"><s:property value="titleSpe" escape="false"/></a>
										</div>
									</s:iterator>
								</div>
								 <div id="pagnation" style="margin-top: 5px;">
								 </div>
							</div>
						</li>
					</ul>
					
				</div>


				<div class="tagContent" id="tagContent1">
					<iframe scrolling="no" src="<%=basePath%>index/shangjia/pro.htm?<s:property value="#brandobj.id"/>" width="660" height="800"
						frameborder="0"></iframe>
				</div>

			</div>
		</div>

		<script type="text/javascript">
function selectTag(showContent,selfObj){
	//标签
	var tag = document.getElementById("tags").getElementsByTagName("li");
	var taglength = tag.length;
	for(i=0; i<taglength; i++){
		tag[i].className = "";
	}
	selfObj.parentNode.className = "selectTag";
	//标签内容
	for(i=0; j=document.getElementById("tagContent"+i); i++){
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";
}

function topage(pageNo,limit){
	jQuery.get('<%=basePath%>brand/brandMessage.shtml?id=<s:property value="#brandobj.id"/>&pageNo='+pageNo+'&limit='+limit,function(mes){
		jQuery("#messageList").html('');
		var json = eval('('+mes+')');
		var str = '';
		for(var i = 0; i < json.length; i++){
			str += '<div class="ddddddddddd">'+
					'<a target="_parent" href="<%=basePath%>brand/showMessage.shtml?messageId='+json[i]['id']+'">'+json[i]['titleSpe']+'</a></div>';
										
		}
		jQuery("#messageList").html(str);
		pagination({
			totalRecords:'<s:property value="#messagePu.totalRecords"/>',
			pageNo:pageNo,
			limit:limit,
			showPages:6,
			uri:function(pageNo,limit){
				topage(pageNo,limit);
			},
			id:'pagnation'
		})
	})
}

pagination({
	totalRecords:'<s:property value="#messagePu.totalRecords"/>',
	pageNo:'<s:property value="#messagePu.pageNo"/>',
	limit:'20',
	showPages:6,
	uri:function(pageNo,limit){
		topage(pageNo,limit);
	},
	id:'pagnation'
})

parent.initIframeHeight(1000)
</script>
	</body>
</html>